# cory and nova use gcc version 3.3.2

TARGET=project2

CC = gcc
DEBUG = -g #-v

LDFLAGS = -lresolv -lnsl -lpthread -lm 
OS = LINUX

CCFLAGS = -Wall $(DEBUG) -D$(OS) -I./inc

# Src file
SRCS = ./src/*.c 

# add object file names here
# OBJS = main.o util.o input.o communicate.o sender.o receiver.o 
OBJS := $(SRCS: ./c=./o)

all: project2

%.o : %.c
	$(CC) -c $(CCFLAGS) $<

%.o : %.cc
	$(CC) -c $(CCFLAGS) $<

$(TARGET): $(OBJS)
	$(CC) -o $(TARGET) $(OBJS) $(CCFLAGS) $(LDFLAGS) 
	

clean:
	rm -f $(TARGET) core ./src/*.o *~ 
	rm -rf ./obj/*

